<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="_ctx" th:content="@{/}"/>
    <title>Admin</title>
    <meta
            content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
            name="viewport">
    <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css"
          th:href="@{/static/bootstrap/css/bootstrap.min.css}">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="../dist/css/font-awesome.min.css"
          th:href="@{/static/adminlte/css/font-awesome.min.css}">
    <!-- Ionicons -->
    <link rel="stylesheet" href="../dist/css/ionicons.min.css" th:href="@{/static/adminlte/css/ionicons.min.css}">
    <!-- Theme style -->
    <link rel="stylesheet" href="../static/dist/css/AdminLTE.min.css"
          th:href="@{/static/adminlte/css/AdminLTE.min.css}">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="../dist/css/skins/all-skins.min.css" th:href="@{/static/adminlte/css/skins/all-skins.min.css}">
    <link rel="stylesheet" th:href="@{/static/plugins/pace-master/themes/blue/pace-theme-flash.css}">

    <style type="text/css">
        html {
            overflow: hidden;
        }
    </style>

<!--    <link rel="stylesheet" th:href="@{https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic}">-->

    <link rel="shortcut icon" type="image/x-icon" th:href="@{/images/logo.png}">
    <!--[if lt IE 9]> <![endif]-->
    <script src="../plugins/ie9/html5shiv.min.js" th:src="@{/static/plugins/jQuery/jquery-2.2.3.min.js}"></script>
    <script src="../plugins/ie9/respond.min.js" th:src="@{/static/plugins/ie9/html5shiv.min.js}"></script>

</head>
<body class="hold-transition skin-blue sidebar-mini fixed">
<div class="wrapper">

    <!-- 头部 -->
    <header th:include="include/header :: admin-header" class="main-header">
    </header>


    <aside th:fragment="admin-left" class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less 菜单-->
        <section class="sidebar">
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="dist/img/user2-160x160.jpg" th:src="${userPath}" style="height: 45px !important;"  class="img-circle"
                         alt="User Image">
                </div>
                <div class="pull-left info">
                    <p th:text="${userName}">Alexander Pierce</p>
                    <a href="#" th:text="${userStatus}"><i class="fa fa-circle text-success"></i> Online</a>
                </div>
            </div>
            <!-- search form -->
            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="q" class="form-control"
                           placeholder="Search..."> <span class="input-group-btn">
							<button type="button" name="search" id="search-btn"
                                    class="btn btn-flat">
								<i class="fa fa-search" onclick="search_menu()"></i>
							</button>
						</span>
                </div>
            </form>

            <ul class="sidebar-menu" data-widget="tree">
                <li class="header">主导航</li>
                <!-- 旧版的不用了 -->
                <!--					<li class="treeview" th:if="${menu.hasMenu}" th:each="menu,mStat:${menus}"><a  href="#" >-->
                <!--							<i class="fa fa-dashboard" th:class="${menu.menuIcon}"></i>-->
                <!--							<span th:text="${menu.menuName}">菜单</span> <span-->
                <!--							class="pull-right-container"> <i-->
                <!--								class="fa fa-angle-left pull-right"></i>-->
                <!--						</span>-->
                <!--					</a>-->
                <!--						<ul class="treeview-menu">-->
                <!--							<li th:if="${subm.hasMenu}"-->
                <!--								th:each="subm,submStat:${menu.subMenu}"><a-->
                <!--								target="mainFrame" href="404.html"-->
                <!--								th:href="@{${subm.menuUrl}}"> <i-->
                <!--									class="fa fa-circle-o"></i> <label-->
                <!--									th:text="${subm.menuName}">子菜单</label>-->
                <!--							</a></li>-->
                <!--						</ul>-->
                <!--					</li>-->
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>


    <div class="content-wrapper">
        <!-- 主体部分！！！！ -->
        <!--			<iframe name="mainFrame" id="mainBodyFrame" th:src="@{/include/main}"-->
        <!--				frameborder="0" scrolling="auto"  width="100%" style="min-height: 900px;" onload="setIframeHeight(this)"></iframe>-->

        <!--bootstrap tab风格 多标签页-->
        <div class="content-tabs">
            <button class="roll-nav roll-left tabLeft" onclick="scrollTabLeft()">
                <i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs menuTabs tab-ui-menu" id="tab-menu">
                <div class="page-tabs-content" style="margin-left: 0px;">

                </div>
            </nav>
            <button class="roll-nav roll-right tabRight" onclick="scrollTabRight()">
                <i class="fa fa-forward" style="margin-left: 3px;"></i>
            </button>
            <div class="btn-group roll-nav roll-right">
                <button class="dropdown tabClose" data-toggle="dropdown">
                    页签操作<i class="fa fa-caret-down" style="padding-left: 3px;"></i>
                </button>
                <ul class="dropdown-menu dropdown-menu-right" style="min-width: 128px;">
                    <li><a class="tabReload" href="javascript:refreshTab();">刷新当前</a></li>
                    <li><a class="tabCloseCurrent" href="javascript:closeCurrentTab();">关闭当前</a></li>
                    <li><a class="tabCloseAll" href="javascript:closeOtherTabs(true);">全部关闭</a></li>
                    <li><a class="tabCloseOther" href="javascript:closeOtherTabs();">除此之外全部关闭</a></li>
                </ul>
            </div>
            <button class="roll-nav roll-right fullscreen" onclick="App.handleFullScreen()"><i
                    class="fa fa-arrows-alt"></i></button>
        </div>
        <div class="content-iframe " style="background-color: #ffffff; ">
            <div class="tab-content " id="tab-content">

            </div>
        </div>

    </div>

    <!-- /.content-wrapper -->
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> 1.0.0
        </div>
        <strong>Copyright &copy; 2018 <a
                href="https://lrshuai.top">帅大叔</a>.
        </strong> All rights reserved.
    </footer>

    <!-- Control Sidebar 工具栏 -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Create the tabs -->
        <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
            <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
            <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
            <li><a href="#control-sidebar-stats-tab" data-toggle="tab"><i class="fa fa-hand-peace-o"></i></a></li>
        </ul>
        <!-- Tab panes -->
        <div class="tab-content">
            <!-- Home tab content -->
            <div class="tab-pane" id="control-sidebar-home-tab">
                <!-- /.control-sidebar-menu -->

            </div>
            <!-- /.tab-pane -->
            <!-- Stats tab content -->
            <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
            <!-- /.tab-pane -->
            <!-- Settings tab content -->
            <div class="tab-pane" id="control-sidebar-settings-tab">
            </div>
            <!-- /.tab-pane -->
        </div>
    </aside>
    <!-- /.control-sidebar -->
    <!-- Add the sidebar's background. This div must be placed
   immediately after the control sidebar -->
    <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->



<!-- jQuery 2.2.3 -->
<script src="../plugins/jQuery/jquery-2.2.3.min.js" th:src="@{/static/plugins/jQuery/jquery-2.2.3.min.js}"></script>
<!-- Bootstrap 3.3.6 -->
<script src="../bootstrap/js/bootstrap.min.js" th:src="@{/static/bootstrap/js/bootstrap.min.js}"></script>
<!-- Slimscroll -->
<script src="../plugins/slimScroll/jquery.slimscroll.min.js" th:src="@{/static/plugins/slimScroll/jquery.slimscroll.min.js}"></script>
<!-- FastClick -->
<script src="../plugins/fastclick/fastclick.js" th:src="@{/static/plugins/fastclick/fastclick.js}"></script>
<script src="../plugins/fastclick/fastclick.js" th:src="@{/static/plugins/pace-master/pace.min.js}"></script>
<!-- AdminLTE App -->
<script src="../static/dist/js/app.js" th:src="@{/static/adminlte/js/app.js}"></script>
<!-- AdminLTE for demo purposes -->
<script src="../static/dist/js/demo.js" th:src="@{/static/adminlte/js/demo.js}"></script>
<!--tabs-->
<script src="../dist/js/app_iframe.js" th:src="@{/static/adminlte/js/app_iframe.js}"></script>


<!-- javascript内联-->
<script type="text/javascript" th:inline="javascript">

    /**
     * 本地搜索菜单
     */
    function search_menu() {
        //要搜索的值
        var text = $('input[name=q]').val();

        var $ul = $('.sidebar-menu');
        $ul.find("a.nav-link").each(function () {
            var $a = $(this).css("border", "");

            //判断是否含有要搜索的字符串
            if ($a.children("span.menu-text").text().indexOf(text) >= 0) {

                //如果a标签的父级是隐藏的就展开
                $ul = $a.parents("ul");

                if ($ul.is(":hidden")) {
                    $a.parents("ul").prev().click();
                }

                //点击该菜单
                $a.click().css("border", "1px solid");

//                return false;
            }
        });
    }


    $(function () {
//        console.log(window.location);

        // App.fixIframeCotent();
        App.setbasePath("/");
        App.setGlobalImgPath("adminlte/img/");


        addTabs({
            id: '168',
            title: '欢迎页',
            close: false,
            url: 'include/main',
            urlType: "relative"
        });


        let tabs = [[${tabs}]];
        $('.sidebar-menu').sidebarMenu({data: tabs});

        // 动态创建菜单后，可以重新计算 SlimScroll
        // $.AdminLTE.layout.fixSidebar();

        /*if ($.AdminLTE.options.sidebarSlimScroll) {
            if (typeof $.fn.slimScroll != 'undefined') {
                //Destroy if it exists
                var $sidebar = $(".sidebar");
                $sidebar.slimScroll({destroy: true}).height("auto");
                //Add slimscroll
                $sidebar.slimscroll({
                    height: ($(window).height() - $(".main-header").height()) + "px",
                    color: "rgba(0,0,0,0.2)",
                    size: "3px"
                });
            }
        }*/

    });


</script>
</body>
</html>
